package com.ebring.shareEducation.utils.WeChat;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * 订单工具类
 * 
 * @author JeffXu
 * @since 2016-08-11
 */
public class IdsUtil {

	public static String genOrderNo() {
		int i = (int) (Math.random() * 900) + 100;
		String MAX = String.valueOf(i);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmssSSS");
		String nowTime = sdf.format(new Date());
		nowTime += MAX;
		return nowTime;
	}

	public static String getId() {
		// 生成唯一id
		String id = UUID.randomUUID().toString();
		// 替换uuid中的"-"
		id = id.replace("-", "");
		return id;
	}

	public static void main(String[] args) {
		System.out.print(getId());
	}
}
